<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
    h1 {color:green;}
    #div .h1 {color:blue;}
    div h1.h1{ color:gold;}
    #h1 {color:silver;}
    div h1#h1 {color:purple;}
    div .h1 {color:gray;}
    .div .h1 {color:black;}

  
    </style>
</head>

<body>
    <a href=""></a>
 
        <div id="div"class="div"><h1 id="h1"class="h1">test</h1></div>
    
 </body>
 </html>